package com.itheima.wisdomnext.entity;

import java.sql.Timestamp;

public class Post {
    private int id; // 帖子 ID
    private int userid; // 发布人 ID
    private String title; // 帖子标题
    private String content; // 帖子内容
    private String videoUrl; // 视频 URL
    private Integer commentPostId; // 点评帖子 ID，允许为 null
    private String location; // 发布帖子的所在地地址，允许为空
    private Integer questionPostId; // 问答帖子 ID，允许为空
    private int categoryId; // 帖子分类 ID
    private Integer topicId; // 话题 ID，允许为空
    private String visibility; // 帖子可见性，public：公开，friends：粉丝可看，followers：关注了的人可以看，private：仅我可看
    private int views; // 帖子浏览量
    private int likes; // 帖子点赞数
    private Timestamp createdAt; // 帖子创建时间
    private int banned; // 封禁标志，0为未封禁，1为封禁
    private int approved; // 审核标志，0为未审核，1为审核通过
    private boolean likedByUser; // 是否被该用户点赞

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public int getViews() {
        return views;
    }

    public void setViews(int views) {
        this.views = views;
    }

    public int getLikes() {
        return likes;
    }

    public void setLikes(int likes) {
        this.likes = likes;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    public int getBanned() {
        return banned;
    }

    public void setBanned(int banned) {
        this.banned = banned;
    }

    public int getApproved() {
        return approved;
    }

    public void setApproved(int approved) {
        this.approved = approved;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public Integer getCommentPostId() {
        return commentPostId;
    }

    public void setCommentPostId(Integer commentPostId) {
        this.commentPostId = commentPostId;
    }

    public boolean isLikedByUser() {
        return likedByUser;
    }

    public void setLikedByUser(boolean likedByUser) {
        this.likedByUser = likedByUser;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public Integer getQuestionPostId() {
        return questionPostId;
    }

    public void setQuestionPostId(Integer questionPostId) {
        this.questionPostId = questionPostId;
    }

    public Integer getTopicId() {
        return topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    public String getVisibility() {
        return visibility;
    }

    public void setVisibility(String visibility) {
        this.visibility = visibility;
    }
}
